#ifndef _BASIC_TIMER_H_
#define _BASIC_TIMER_H_

#define TIMER_6_BASE (5)

#pragma pack(1)

struct time_count {
    unsigned int  count;
    unsigned int  benchmark;
    unsigned char run;
};

struct timer6_count_variable {
    struct time_count request_interval;
    struct time_count handshake_wait;
};

#pragma pack()

void         init_timer6(void);
void         add_timer_count_variable(struct time_count *p_time_count, unsigned int num);
unsigned int get_running_time(struct time_count *p_time_count);
unsigned int get_time_benchmark(unsigned int time);
void         set_time_satisfy(struct time_count *p_time_count);
void         set_time_delay(struct time_count *p_time_count, unsigned int delay_ms);
unsigned int judge_time_delay(struct time_count *p_time_count);
void         clear_time_count(struct time_count *p_time_count);
void         add_timer_count_variable(struct time_count *p_time_count, unsigned int num);

extern struct timer6_count_variable timer6_count;

#endif
